#include <iostream>
#include "includes/dg-evolve-combine-weight.hh"
// #include "includes/basis-function.hh
DGEvolveCombineWeight::DGEvolveCombineWeight(){
};
DGEvolveCombineWeight::~DGEvolveCombineWeight(){
};
void DGEvolveCombineWeight::dg_evolve_combine_weight(int i){
  double basis_middle[8];
  for(int tmpi=0; tmpi<8; tmpi++){
    basis_middle[tmpi]=0.0;
  }
  basis.getBasisMiddle(basis_middle);
  
  for(int tmpi=0; tmpi<memory::phynumber; tmpi++)
   memory::variable[memory::dgorder*memory::phynumber+tmpi][i]=0.0;
  for(int tmpj=0; tmpj<memory::dgorder; tmpj++)
    for(int tmpi=0; tmpi<memory::phynumber; tmpi++)
      memory::variable[memory::dgorder*memory::phynumber+tmpi][i] += memory::variable[tmpj*memory::phynumber+tmpi][i]*basis_middle[tmpj];
  //for(int tmpi=0; tmpi<memory::phynumber; tmpi++)
  //  memory::variable[memory::dgorder*memory::phynumber+tmpi][i]=memory::variable_tmp[memory::dgorder*memory::phynumber+tmpi][i];
};
